<template>
	<div class="fields-bottom-input" v-if="fieldsObj.type">
		<p v-if="!fieldsObj.settings.value" class="input-tips">
			请输入内容
		</p>
		<p v-else class="input-content">
			{{ fieldsObj.settings.value }}
		</p>
        <i class="el-icon-date"></i>
	</div>
</template>

<script>
export default {
  name: 'CTime',
  props: {
    fields: {
      default: () => {
        return {}
      },
    },
  },
  watch: {
    'fields': {
      handler (val) {
        this.fieldsObj = val
      },
      deep: true,
      immediate: true
    }
  },
  data () {
    return {
      fieldsObj: {}
    }
  },
  mounted () {
    this.fieldsObj = this.fields
  }
}
</script>

<style lang="less" scoped>
.input-tips {
  color: #CBCFD6;
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
}

.fields-bottom-input {
    position: relative;

    .el-icon-date {
        position: absolute;
        right: 12px;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }
}
</style>
